

const { uuid } = require('../../common/utils/uuidUtil');
const { getUserDataPath } = require('../../common/utils/fileUtil')


exports.shellPluginWarper = function (request, event) {

}


exports.functionPluginWarper = function (name, desc, icon, action) {
    return {
        type: "function",
        name: name,
        desc: desc,
        action: action,
        icon: icon,
        pluginId: uuid()
    }
}



exports.functionPluginWarper = function (name, desc, icon, action) {
    return {
        type: "function",
        name: name,
        desc: desc,
        action: action,
        icon: icon,
        pluginId: uuid()
    }
}





exports.localPluginWarper = function (features) {
    const thePlugins = []
    for (let feature of features) {
        thePlugins.push({
            ...feature,
            envInfo: { userDataPath: getUserDataPath() }
        })
    }


    return thePlugins
}

